package com.zc.mychart.utils;

import android.os.CountDownTimer;
import android.os.Handler;
import android.os.Message;

public class MyTimer extends CountDownTimer {
    private Handler mHandler = new Handler() {
        public void handleMessage(Message msg) {
            MyTimer.this.onFinish();
            MyTimer.this.cancel();
        }
    };

    public MyTimer(long millisInFuture, long countDownInterval) {
        super(millisInFuture, countDownInterval);
    }

    @Override
    public void onTick(long millisUntilFinished) {

    }

    @Override
    public void onFinish() {

    }

    public void finishTimer() {
        mHandler.sendEmptyMessage(0);
    }
}
